using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;

namespace Zeus.Biz.DomainModel.NHib.Northwind {
    
    
    public class InvoiceMap : ClassMap<Invoice> {
        
        public InvoiceMap() {
			Table("Invoices");
			LazyLoad();
			CompositeId();
			Map(x => x.ShipName).Column("ShipName").Length(40);
			Map(x => x.ShipAddress).Column("ShipAddress").Length(60);
			Map(x => x.ShipCity).Column("ShipCity").Length(15);
			Map(x => x.ShipRegion).Column("ShipRegion").Length(15);
			Map(x => x.ShipPostalCode).Column("ShipPostalCode").Length(10);
			Map(x => x.ShipCountry).Column("ShipCountry").Length(15);
			Map(x => x.CustomerID).Column("CustomerID").Length(5);
			Map(x => x.CustomerName).Column("CustomerName").Not.Nullable().Length(40);
			Map(x => x.Address).Column("Address").Length(60);
			Map(x => x.City).Column("City").Length(15);
			Map(x => x.Region).Column("Region").Length(15);
			Map(x => x.PostalCode).Column("PostalCode").Length(10);
			Map(x => x.Country).Column("Country").Length(15);
			Map(x => x.Salesperson).Column("Salesperson").Not.Nullable().Length(31);
			Map(x => x.OrderID).Column("OrderID").Not.Nullable();
			Map(x => x.OrderDate).Column("OrderDate");
			Map(x => x.RequiredDate).Column("RequiredDate");
			Map(x => x.ShippedDate).Column("ShippedDate");
			Map(x => x.ShipperName).Column("ShipperName").Not.Nullable().Length(40);
			Map(x => x.ProductID).Column("ProductID").Not.Nullable();
			Map(x => x.ProductName).Column("ProductName").Not.Nullable().Length(40);
			Map(x => x.UnitPrice).Column("UnitPrice").Not.Nullable();
			Map(x => x.Quantity).Column("Quantity").Not.Nullable();
			Map(x => x.Discount).Column("Discount").Not.Nullable();
			Map(x => x.ExtendedPrice).Column("ExtendedPrice");
			Map(x => x.Freight).Column("Freight");
        }
    }
}
